In a computer system which utilizes a file system buffer cache (FBC) scheme, it is often difficult to determine how much main memory to allocate between the buffer cache and the virtual address space used by user applications. The allocation is typically performed at system boot time, at which instance a specified amount of memory is allocated to the FBC and the remaining memory is allocated as virtual address space. The amount of memory required by the FBC and user processes is therefore very load dependent and application specific, which can vary greatly. Such demand variations can even fluctuate by the hour. Therefore, static memory allocation have at least two problems. First, it is difficult to arrive at a good estimate of the demand for memory for the initial allocation. Second, once the memory space is allocated, the allocation may result in memory not being used efficiently because of over-allocation, or improper operation because of under-allocation.
In recognition of this problem, one solution has been formulated. This solution allows the mapping of FBC onto the virtual address space, so that in effect both the FBC and the user processes satisfy memory requirements by acquiring memory space from the same pool. Although effectively resolving the problems associated with static memory allocation, the implementation of such a scheme involves a substantial reprogramming of the FBC and virtual memory (VM) management software modules. In addition, it is possible for either FBC or user processes to dominate by acquiring a major portion of available memory space. In constant contention for available memory space, either FBC or user processes may lose when there is a heavy demand by the other.
Therefore, it is desirable to provide for a memory allocation scheme which allows FBC and user processes to request memory and allocate it accordingly in a dynamic fashion. Furthermore, it is desirable to achieve dynamic memory allocation without major revision and modification of current FBC and VM management software.
In addition, in a multiprocessor system, though the management of FBC and VM does not cross processor boundaries, access to memory may. This multiprocessor environment poses special challenges in implementing a dynamic memory allocation system. Thus, it is desirable to achieve dynamic memory allocation that functions in a multiprocessor environment.